﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MvcShop.Models.ViewDataModels
{
    public class ViewDataBase:IMessageViewData,IErrorViewData
    {
        #region IMessageViewData 成员

        public string Message
        {
            get;
            set;
        }

        #endregion

        #region IErrorViewData 成员

        public string ErrorMessage
        {
            get;
            set;
        }

        #endregion

        public ViewDataBase WithErrorMessage(string errorMessage)
        {
            this.ErrorMessage = errorMessage;
            return this;
        }

        public ViewDataBase WithMessage(string message)
        {
            this.Message = message;
            return this;
        }
    }
}
